package com.henry.kadan;



import com.henry.read.ClaimInfo;
import com.tools.hry.xls.AnalysisXlsTool;
import com.tools.hry.xls.analysis.AnalysisResult;
import com.tools.hry.xls.analysis.ICallbackFunction;

import java.io.FileInputStream;
import java.util.List;

/**
 * Created by 峥桂 on 2017/1/12.
 */
public class Test {
    public static void main(String agrs[]) throws Exception {
        analysis1();
    }

    public static void analysis1()throws Exception{
        AnalysisXlsTool.readInputStreamAndToEntity(new FileInputStream("d:\\数据上传0108.xlsx"), BrokerDataExcel.class
                , 0, 0, new ICallbackFunction<BrokerDataExcel>() {
                    public void onFailure(AnalysisResult result) throws Exception {
                        System.out.println("===onFailure=====");
                        System.out.println(result.getErrorLogBeans());
                        System.out.println(result.getException().getMessage());
                    }

                    public void onSuccess(AnalysisResult result, List resultList) throws Exception {
                        System.out.println(resultList);
                    }

                    public void before(AnalysisResult result) throws Exception {

                    }

                    public void after(AnalysisResult result) throws Exception {

                    }
                });

    }
}
